package com.richper.springcloudh2020.service;

import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.netflix.hystrix.contrib.javanica.annotation.HystrixProperty;
import com.richper.springcloudh2020.service.fallback.HystrixOrderFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "CLOUD-HYSTRIX-PAYMENT-SERVICE",fallback = HystrixOrderFallBack.class)
@Component
public interface HystrixOrderService {

    @GetMapping("/payment_ok")
    String payment_ok();

    @GetMapping("/payment_timeOut")
    String payment_timeOut();

    @GetMapping("/div/{id}")
    String div(@PathVariable(value = "id") int id);
}
